﻿using PEProtocol;

/**
 * 副本业务
 */
public class FuBenSys : SystemRoot{
    public static FuBenSys Instance = null;

    public FuBenWnd fuBenWnd = null;

    public override void InitSys(){
        base.InitSys();
        Instance = this;
        PECommon.Log("FuBenSys Init Done...");
    }

    public void EnterFuBen(){
        SetFuBenState();
    }

    public void SetFuBenState(bool isActive = true){
        fuBenWnd.SetWndState(isActive);
    }

    public void ResFBFight(GameMsg msg){
        GameRoot.Instance.SetPlayerDataByFBStart(msg.resBfFight);
        
        MainCitySys.Instance.mainCityWnd.SetWndState(false);
        
        SetFuBenState(false);
        
        BattleSys.Instance.StartBattle(msg.resBfFight.fbid);
    }
}